import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/home/index.vue'
import Qiehuan from '@/components/qiehuan.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    // component: Home
    components:{
      default:Home,
      footer:Qiehuan
    }
  },
  {
    path: '/ab',
    name: 'ab',
    // component: () => import('../views/ab/index.vue')
    components:{
      default:() => import('../views/ab/index.vue'),
      footer:Qiehuan
    }
  },
  {
    path: '/ac',
    name: 'ac',
    // component: () => import('../views/ac/index.vue')
    components:{
      default:() => import('../views/ac/index.vue'),
      footer:Qiehuan
    }
  },
  {
    path: '/ad',
    name: 'ad',
    // component: () => import('../views/ad/index.vue')
    components:{
      default:() => import('../views/ad/index.vue'),
      footer:Qiehuan
    }
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: () => import('../views/detail/index.vue')

  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/index.vue')

  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
